package sample.utils;

import java.util.List;

public class StringUtils {

    /**
    　* @description: target中是否包含keywords中的关键词，包含则返回true，反之false
    　* @author tina.tao
    　* @date 2019/8/14 16:00
    　*/
    public static boolean contains(String target, List<String> keyWords) {
        if(!CollectionsUtils.isEmpty(keyWords)) {
            long containCount = keyWords.stream().filter(x->target.contains(x)).count();
            return containCount > 0;
        }
        return false;
    }

    public static boolean isEmpty(CharSequence cs) {
        return cs == null || cs.length() == 0 || cs.toString().trim().isEmpty();
    }
}
